package o;

import com.google.android.exoplayer2.decoder.DecoderInputBuffer;
import com.google.android.exoplayer2.text.SubtitleDecoderException;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import java.nio.ByteBuffer;

public abstract class ajh extends add<ajl, ajj, SubtitleDecoderException> implements ajf {
    private final String ˎ;

    protected abstract aji ˎ(byte[] bArr, int i, boolean z) throws SubtitleDecoderException;

    protected /* synthetic */ acx ʻ() {
        return ʼ();
    }

    protected /* synthetic */ Exception ˋ(DecoderInputBuffer decoderInputBuffer, acx o_acx, boolean z) {
        return ˎ((ajl) decoderInputBuffer, (ajj) o_acx, z);
    }

    protected /* synthetic */ void ˋ(acx o_acx) {
        ॱ((ajj) o_acx);
    }

    protected /* synthetic */ Exception ॱ(Throwable th) {
        return ˏ(th);
    }

    protected /* synthetic */ DecoderInputBuffer ॱॱ() {
        return ʽ();
    }

    protected ajh(String str) {
        super(new ajl[2], new ajj[2]);
        this.ˎ = str;
        ˋ((int) WXMediaMessage.DESCRIPTION_LENGTH_LIMIT);
    }

    public void ˏ(long j) {
    }

    protected final ajl ʽ() {
        return new ajl();
    }

    protected final ajj ʼ() {
        return new ajg(this);
    }

    protected final SubtitleDecoderException ˏ(Throwable th) {
        return new SubtitleDecoderException("Unexpected decode error", th);
    }

    protected final void ॱ(ajj o_ajj) {
        super.ˋ((acx) o_ajj);
    }

    protected final SubtitleDecoderException ˎ(ajl o_ajl, ajj o_ajj, boolean z) {
        try {
            ByteBuffer byteBuffer = o_ajl.ॱ;
            aji ˎ = ˎ(byteBuffer.array(), byteBuffer.limit(), z);
            o_ajj.ˎ(o_ajl.ˏ, ˎ, o_ajl.ˊ);
            o_ajj.ˋ(Integer.MIN_VALUE);
            return null;
        } catch (SubtitleDecoderException e) {
            return e;
        }
    }
}
